<!DOCTYPE html>
<html lang="zh-cn" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" th:href="@{/layui/css/layui.css}">
    <link rel="stylesheet" th:href="@{/css/style.css}">
    <link rel="stylesheet" th:href="@{/css/jquery.treeview.css}">
    <link rel="icon" type="image/x-icon" th:href="@{/img/favicon.ico}">
    <script th:src="@{/js/jquery.min.js}"></script>
    <title th:text="${torrent.fileName}"></title>
</head>
<body>
<div th:replace="common/header :: header"></div>
<div class="layui-container dodder-body">
    <pre th:replace="common/banner :: banner"></pre>
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md9">
            <div class="layui-card dodder-box-shadow">
                <div class="layui-card-header dodder-nowrap" style="border-bottom: none">
                    <button class="dodder-return-btn layui-icon layui-icon-return" onclick="javascript :history.back(-1);"></button>
                    &nbsp;<b th:text="${torrent.fileName}" th:title="${torrent.fileName}"></b>
                </div>
                <div class="layui-card-body">
                    <ul class="dodder-torrent-header">
                        <li>发现时间：[[${#calendars.format(torrent.createDate,'yyyy年MM月dd日 HH时mm分ss秒')}]]</li>
                        <li>文件大小：[[${#dodderUtil.formatSize(torrent.fileSize)}]]</li>
                        <li class="dodder-tag-list">文件类型：
                            <ul th:each="type : ${#strings.arraySplit(torrent.fileType,',')}" th:remove="tag">
                                <a class="layui-badge" th:href="@{/(fileType=${type})}" th:text="${type}"></a>
                            </ul>
                        </li>
                    </ul>
                    <p class="layui-icon layui-icon-link dodder-magnet-link dodder-clear"> 下载链接：<a
                            th:href="${'magnet:?xt=urn:btih:' + torrent.infoHash}"
                            th:text="${'magnet:?xt=urn:btih:' + torrent.infoHash}"></a></p>
                    <hr class="layui-bg-red">
                    <div class="layui-anim layui-anim-up dodder-torrent-info" th:utext="${treeFiles}"></div>
                    <blockquote class="layui-elem-quote" th:unless="${#lists.isEmpty(similar)}">相关推荐</blockquote>
                    <ul class="layui-timeline">
                        <li class="layui-timeline-item" th:each="t : ${similar}">
                            <i class="layui-icon layui-timeline-axis">&#xe63f;</i>
                            <div class="layui-timeline-content">
                                <a th:href="@{/info/__${t.infoHash}__}" class="layui-timeline-title dodder-green"
                                   th:text="${t.fileName}"></a>
                                <p class="layui-text" style="word-break:break-all;">
                                    <span th:each="node : ${#dodderUtil.getFileList(t)}" th:remove="tag">
                                        <span class="layui-badge-dot layui-bg-cyan"></span> <span
                                            th:text="${node.filename}" th:remove="tag"></span><br>
                                    </span>
                                </p>
                            </div>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
        <div class="layui-col-md3">
            <div th:replace="common/profile :: profile"></div>
        </div>
    </div>
</div>
<footer th:replace="common/footer :: footer"></footer>
<script th:src="@{/js/jquery.treeview.js}"></script>
<script th:src="@{/layui/layui.all.js}"></script>
<script th:src="@{/js/search.js}"></script>
<script>
    $('.treeview').treeview();
</script>
</body>
</html>